package com.hfh.management.comments;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * Created by yzYang on 2014/12/13.
 */
@Service
public class CommentsServiceImpl implements CommentsService{

    @Autowired
    private CommentsDao cDao;

    @Override
    public boolean saveComment(String ccontent, String name) {
//        cDao.saveComment( ccontent,  name);

        return cDao.saveComment( ccontent,  name);
    }

//    @Override
//    public List<CusComment> getCommentsList(String pageIndex) {
////        cDao.getCommentsList();
//        return  cDao.getCommentsList(pageIndex);
//    }
    @Override
    public Map<String,Object> getCommentsList(String pageIndex) {
//       cDao.getCommentsList();
        return  cDao.getCommentsList(pageIndex);
    }

    public Map<String,Object> getCommentsList(String pageIndex,int pagesize) {
//       cDao.getCommentsList();
        Map<String,Object> m  = cDao.getCommentsList(pageIndex,pagesize);
        return  m;
    }

}
